import request from '@/utils/request'

// 查询applyNews列表
export function listApplyNews(query) {
  return request({
    url: '/applyNews/applyNews/list',
    method: 'get',
    params: query
  })
}

// 通过新闻发布
export function addNews(data) {
  return request({
    url: '/applyNews/applyNews/pass',
    method: 'post',
    data: data
  })
}

// 通过新闻发布状态改变
export function passApplyNews(id) {
  return request({
    url: '/applyNews/applyNews/pass/'+id,
    method: 'put'
  })
}


// 驳回新闻发布
export function backApplyNews(id) {
  return request({
    url: '/applyNews/applyNews/back/'+id,
    method: 'put'
  })
}


// 查询applyNews详细
export function getApplyNews(id) {
  return request({
    url: '/applyNews/applyNews/' + id,
    method: 'get'
  })
}

// 新增applyNews
export function addApplyNews(data) {
  return request({
    url: '/applyNews/applyNews',
    method: 'post',
    data: data
  })
}

// 修改applyNews
export function updateApplyNews(data) {
  return request({
    url: '/applyNews/applyNews',
    method: 'put',
    data: data
  })
}

// 删除applyNews
export function delApplyNews(id) {
  return request({
    url: '/applyNews/applyNews/' + id,
    method: 'delete'
  })
}
